

#load replication data

#cd "C:\Users\dmglick\Dropbox\Summer Survey 2020\Papers\Judicial Politics\RBGPaper\JLC Final"

# I left my directories in here - to replicate tables just change directories or turn off "tex" option in esttab





set scheme plotplain



 


############ CODING THE DEPENDENT VARIABLES #############



# legal realism is items q158, 159, 161 - all are coded such that higher numbers = more realism (note: q160 was an attention check item)

gen realism_court = q158+q159+q161


# politicized is q162 163 164

# 162 needs to be reversed to make higher more politicized

recode q162 1=5 5=1 2=4 4=2

# 164 needs to be reversed to make higher more politicized

recode q164 1=5 5=1 2=4 4=2

gen politicized_court = q162+ q163 + q164


# legitimacy is 165 166 167 -- we want higher to be more legitimate -- all three are in the right direction

gen legitimacy = q165+ q166 + q167

gen legitimacy_fivept=legitimacy/3 


# standaridize key indices

egen std_realism = std(realism_court)
egen std_politicized = std(politicized_court)
egen std_legitimacy = std(legitimacy)




# Coding what peolpe want to know more about

split q350, p(,) destring

gen court_reform = 0

foreach v of varlist q3501-q3505{
replace court_reform = 1 if `v' == 4
}

gen court_campaign = 0

foreach v of varlist q3501-q3505{
replace court_campaign = 1 if `v' == 5
}



gen answered_more_info=1
replace answered_more_info = 0 if q3501==9
replace answered_more_info = 0 if q350==""

gen court_reform_responded=court_reform
replace court_reform_responded=. if answered_more_info==0

gen court_campaign_responded=court_campaign
replace court_campaign_responded=. if answered_more_info==0
 







########## Basic descriptives about DVs -- reported just before main results ############

# generate four types based on the more info variables

gen info_type = 1 if court_reform == 1 & court_campaign==1
replace info_type = 2 if court_reform == 1 & court_campaign==0
replace info_type = 3 if court_reform == 0 & court_campaign==1
replace info_type = 4 if court_reform == 0 & court_campaign==0

label define info_type 1 "Both" 2 "Reform Only" 3 "Appointments Only" 4 "Neither"
label values info_type info_type


mean std_legitimacy, over(info_type)


## check for sample balance -- 
gen judges_block = 0
replace judges_block = 1 if fl_8_do == "FederalJudgesBlock" 
replace judges_block = 1 if fl_131_do == "FederalJudgesBlock" 


estpost ttest pid_7 pol_info info_court college female age white homeowner, by(after_RBG)



####### TABLE 1 #######


esttab . using Table1-demos.tex, wide nonumber noobs replace cell("mu_1(fmt(2)) mu_2(fmt(2)) b(star fmt(2)) p(fmt(3))") /// 
collabels("Pre Respondents" "Post Respondents" "Diff" "P-Diff") nomtitles label booktabs 





########### Main Results Tables and Figure  #################

# Note -- two slightly different sets of controls -- the former includes 7 point partisanship when all respondents included
#the second excludes party in models that subset on party

local controls_all after_RBG  pid_7  pol_info i.college i.female age i.white i.homeowner
local controls_party after_RBG pol_info i.college i.female age i.white i.homeowner


## ALL
regress std_realism `controls_all'
quietly est store realism_all_c

quietly quietly regress std_politicized `controls_all'
quietly est store politicized_all_c

quietly regress std_legitimacy `controls_all'
quietly est store legitimacy_all_c

quietly regress court_reform `controls_all'
quietly est store reform_all_c

quietly regress court_campaign `controls_all'
quietly est store campaign_all_c


quietly logit court_reform `controls_all'
quietly est store reform_all_c_logit

quietly logit court_campaign `controls_all'
quietly est store campaign_all_c_logit



# Appendix Table
esttab realism_all_c politicized_all_c legitimacy_all_c reform_all_c campaign_all_c reform_all_c_logit campaign_all_c_logit using all_main_model.tex /// 
, title("Change in Key DVs: All Respondents") mtitle("Realism" "Politicized" "Legit" "\shortstack{Reform\\Info}" /// 
"\shortstack{Appts\\Info}" "\shortstack{Reform\\Info\\Logit}" "\shortstack{Appts\\Info\\Logit}") replace label ///
drop(0.female 0.college 0.white 0.homeowner) coeflabel(1.female "Female" 1.homeowner "Homeowner" 1.college "College Degree" 1.white "White") ///
star(+ 0.1 * 0.05 ** 0.01) booktabs compress b(3) se(3) ///
addnote("Models: 1-3 are OLS on standardized DVs, 4-5 linear estimates with dichotomous DVs," "6-7 logit on the same DVs.") 




# Rs

local controls_party after_RBG pol_info i.college i.female age i.white i.homeowner

quietly regress std_realism `controls_party' if rep==1
quietly est store realism_r_c

quietly regress std_politicized `controls_party' if rep==1
quietly est store politicized_r_c

quietly regress std_legitimacy `controls_party' if rep==1
quietly est store legitimacy_r_c


quietly regress court_reform `controls_party' if rep==1
quietly est store reform_r_c

quietly regress court_campaign `controls_party' if rep==1
quietly est store campaign_r_c

quietly logit court_reform `controls_party' if rep==1
quietly est store reform_r_c_logit

quietly logit court_campaign `controls_party' if rep==1
quietly est store campaign_r_c_logit


# Appendix Table
esttab realism_r_c politicized_r_c legitimacy_r_c reform_r_c campaign_r_c reform_r_c_logit campaign_r_c_logit  using reps_main_model.tex /// 
, title("Change in Key DVs: Republicans") mtitle("Realism" "Politicized" "Legit" "\shortstack{Reform\\Info}" /// 
"\shortstack{Appts\\Info}" "\shortstack{Reform\\Info\\Logit}" "\shortstack{Appts\\Info\\Logit}") replace label ///
drop(0.female 0.college 0.white 0.homeowner) coeflabel(1.female "Female" 1.homeowner "Homeowner" 1.college "College Degree" 1.white "White") ///
star(+ 0.1 * 0.05 ** 0.01) booktabs compress b(3) se(3) ///
addnote("Models: 1-3 are OLS on standardized DVs, 4-5 linear estimates with dichotomous DVs," "6-7 logit on the same DVs.") 

## Ds



local controls_party after_RBG pol_info i.college i.female age i.white i.homeowner


quietly regress std_realism `controls_party' if dem==1
quietly est store realism_d_c

quietly regress std_politicized `controls_party' if dem==1
quietly est store politicized_d_c

quietly regress std_legitimacy `controls_party' if dem==1
quietly est store legitimacy_d_c

quietly regress court_reform `controls_party' if dem==1
quietly est store reform_d_c

quietly regress court_campaign `controls_party' if dem==1
quietly est store campaign_d_c

logit court_reform `controls_party' if dem==1
quietly est store reform_d_c_logit

quietly logit court_campaign `controls_party' if dem==1
quietly est store campaign_d_c_logit


# Appendix Table
esttab realism_d_c politicized_d_c legitimacy_d_c reform_d_c campaign_d_c reform_d_c_logit campaign_d_c_logit  using dems_main_model.tex /// 
, title("Change in Key DVs: Democrats") mtitle("Realism" "Politicized" "Legit" "\shortstack{Reform\\Info}" /// 
"\shortstack{Appts\\Info}" "\shortstack{Reform\\Info\\Logit}" "\shortstack{Appts\\Info\\Logit}") replace /// 
label drop(0.female 0.college 0.white 0.homeowner) coeflabel(1.female "Female" 1.homeowner "Homeowner" 1.college "College Degree" 1.white "White") ///
star(+ 0.1 * 0.05 ** 0.01) booktabs compress b(3) se(3) ///
addnote("Models: 1-3 are OLS on standardized DVs, 4-5 linear estimates with dichotomous DVs," "6-7 logit on the same DVs.") 


## Before Making Tables and Plots ##

#Check for whether the key coefficients are different from each other in the Rs and Ds models ## 

# Legitimacy

suest legitimacy_r_c legitimacy_d_c
test [legitimacy_r_c_mean]after_RBG=[legitimacy_d_c_mean]after_RBG

# Reform interest

suest reform_r_c reform_d_c
test [reform_r_c_mean]after_RBG=[reform_d_c_mean]after_RBG






######### TABLE 2 ###########
# Reform and Legitimacy Results for ALL, Dems, Reps #

esttab legitimacy_d_c legitimacy_r_c legitimacy_all_c  reform_d_c reform_r_c reform_all_c   using Table2-legit_reform_models.tex /// 
, title("Change in Legitimacy and Reform Interest"\label{tab:legitreform}) mtitle("\shortstack{Legitimacy\\Democrats}" "\shortstack{Legitimacy\\Republicans}" "\shortstack{Legitimacy\\All}" ///
"\shortstack{Reform\\Democrats}" "\shortstack{Reform\\Republicans}" "\shortstack{Reform\\All}")  replace label ///
drop(0.female 0.college 0.white 0.homeowner) coeflabel(1.female "Female" 1.homeowner "Homeowner" 1.college "College Degree" 1.white "White") ///
star(+ 0.1 * 0.05 ** 0.01) booktabs compress b(2) se(2) ///
addnote("Models: 1-3 are OLS on standardized DVs, 4-6 linear estimates with dichotomous DVs.") 




############# FIGURE 1 ### ##########
####Main coefficient plot figure

coefplot  (legitimacy_d_c, aseq("Democrats") mcolor(blue) msymbol(T) msize(medlarge) ciopts(lcolor(blue))) /// 
(legitimacy_r_c, aseq("Republicans") mcolor(red) msymbol(Sh) msize(medlarge) ciopts(lcolor(red) )) ///
(legitimacy_all_c, aseq("All") mcolor(black) msymbol(Oh) msize(medlarge) ciopts(lcolor(black) )) ///
, nokey bylabel("{bf:Court Legitimacy}") || ///
(politicized_d_c, aseq("Democrats") ) ///
(politicized_r_c, aseq("Republicans") ) ///
(politicized_all_c, aseq("All") ) ///
, nokey bylabel(Politicized Court) || ///
(realism_d_c, aseq("Democrats") ) ///
(realism_r_c, aseq("Republicans") ) ///
(realism_all_c, aseq("All") ) ///
, bylabel(Legal Realism) nokey || ///
, keep(after_RBG) xscale(range(-.75(.25).75)) xlabel(-.5(.25).5, labsize(medlarge))  legend(off) nooffset asequation swapnames  xline(0) ///
byopts(compact rows(1)) ///
graphregion(margin(0 0 0 0)) ylab(,labsize(medlarge)) plotregion(margin(0 0 0 0)) ysize(2.7) subtitle(, size(large)) legend(size(medlarge)) ///
subtitle(, size(medlarge)) xtitle(Standardized Effect of Ginburg's Passing (Post Group vs. Pre), size(medlarge)) ///
saving(main_continuous, replace)


coefplot  (reform_d_c, aseq("Democrats") mcolor(blue) msymbol(T) msize(medlarge) ciopts(lcolor(blue))) /// 
(reform_r_c, aseq("Republicans") mcolor(red) msymbol(Sh) msize(medlarge) ciopts(lcolor(red) )) ///
(reform_all_c, aseq("All") mcolor(black) msymbol(Oh) msize(medlarge) ciopts(lcolor(black) )) ///
, nokey bylabel("{bf:Interest in Learning More: Court Reform}") || ///
(campaign_d_c, aseq("Democrats") ) ///
(campaign_r_c, aseq("Republicans") ) ///
(campaign_all_c, aseq("All")) ///
, bylabel(Interest in Learning More: Appointments in Campaigns) nokey || ///
, keep(after_RBG) xscale(range(-.75(.25).75)) xlabel(-.5(.25).5, labsize(medlarge))  legend(off) nooffset asequation swapnames  xline(0) ///
byopts(compact rows(1)) ///
graphregion(margin(0 0 0 0)) ylab(,labsize(medlarge)) plotregion(margin(0 0 0 0)) ysize(2.7) subtitle(, size(large)) legend(size(medlarge)) ///
subtitle(, size(medlarge)) xtitle(Proportion Interested in Learning More: Effect of Ginburg's Passing (Post Group vs. Pre), size(medlarge)) ///
saving(main_dichotomous, replace)


gr combine main_continuous.gph main_dichotomous.gph, col(1) ///
note("All models control for political information, gender, race, age, homeownership, education." "Models for 'All' also include seven point PID", size(medsmall)) 

graph export "C:\Users\dmglick\Dropbox\Summer Survey 2020\Papers\Judicial Politics\RBGPaper\JLC Final\Figure1-mainresults_controls_V2.eps", replace



################# FIGURE 2 ###############

# Parse efffects among different types of Democrats


# As plot

mean std_legitimacy if dem==1 & strong_partisan==1, over(after_RBG)
est store strong_legit

mean std_legitimacy if dem==1 & strong_partisan==0, over(after_RBG)
est store weak_legit

mean court_reform if demo==1 & strong_partisan==1, over(after_RBG)
est store strong_reform

mean court_reform if dem==1 & strong_partisan==0, over(after_RBG)
est store weak_reform


	coefplot (strong_legit, label("Strong Democrats", labsize(large)) mcolor(blue) msymbol(T) msize(medlarge) ciopts(lcolor(blue))) /// 
	(weak_legit, label("Other Democrats Including Leaners") mcolor(navy) msymbol(X) msize(medlarge) ciopts(lcolor(navy))), bylabel(Standardized Legitimacy)  || ///
	(strong_reform, label("Strong Democrats") mcolor(blue) msymbol(T) msize(medlarge) ciopts(lcolor(blue))) /// 
	(weak_reform, label("Other Democrats Including Leaners") mcolor(navy) msymbol(X) msize(medlarge) ciopts(lcolor(navy))), bylabel(Reform Interest) || ///
	, xscale(range(-1(.25)1)) xlabel(-.75(.25).75, labsize(medlarge))  coeflabels(1= "After Ginsburg Passing" 0 = "Before Ginsburg Passing") /// 
	byopts(compact rows(1)) subtitle(, size(vlarge))  ylab(,labsize(vlarge)) plotregion(margin(0 0 0 0)) ysize(2.2) legend(size(large)) xline(0)

	
graph export "C:\Users\dmglick\Dropbox\Summer Survey 2020\Papers\Judicial Politics\RBGPaper\JLC Final\Figure2-dem_diffs.eps", replace
	
	




# As t test and simple regression 
# p values referenced near the end of the discussion of the strong vs. other democrats comparision#


# legitimacy

ttest std_legitimacy if dem==1 & strong_partisan==1, by(after_RBG)
ttest std_legitimacy if dem==1 & strong_partisan==0, by(after_RBG)

regress std_legitimacy i.after_RBG##strong_partisan pol_info i.college i.female age i.white i.homeowner if democrat==1 


# reform


ttest court_reform if dem==1 & strong_partisan==1, by(after_RBG)
ttest court_reform if dem==1 & strong_partisan==0, by(after_RBG)

regress court_reform i.after_RBG##strong_partisan pol_info i.college i.female age i.white i.homeowner if dem==1 





################# FIGURE 3 #################
# Second "additional analysis" in main body of paper
#Modelling with realism and politicization included

 


# note - uses democrat_not_republican variable -- analysis is only dems vs. reps #


quietly regress std_legitimacy i.democrat_not_republican  std_realism std_politicized  pol_info i.college i.female age i.white i.homeowner if after_RBG==0 

quietly est store before_legit

quietly regress std_legitimacy i.democrat_not_republican  std_realism std_politicized i.democrat pol_info i.college i.female age i.white i.homeowner  if after_RBG==1 

quietly est store after_legit


# check whether the before and after coeffs among dems are significant
suest before_legit after_legit
test [before_legit_mean]1.democrat_not_republican=[after_legit_mean]1.democrat_not_republican




# Subbing in the more info measures as the DV ###################

# Separate Models By Party Before and After -- Party effect only after

quietly regress court_reform i.democrat_not_republican  std_realism std_politicized  pol_info i.college i.female age i.white i.homeowner if after_RBG==0 
quietly est store before_reform

quietly regress court_reform i.democrat_not_republican  std_realism std_politicized i.democrat pol_info i.college i.female age i.white i.homeowner  if after_RBG==1 
quietly est store after_reform


#Making the plot  


coefplot (before_legit, label("Pre Observations")  msymbol(Oh)) /// 
(after_legit, label("Post Observations") msymbol(D)), bylabel(Standardized Legitimacy DV) || ///
 (before_reform, label("Pre Observations")  msymbol(Oh)) /// 
(after_reform, label("Post Observations") msymbol(D)), bylabel(Reform Curiosity DV) || ///
, keep (1.after_RBG 1.democrat_not_republican std_realism std_politicized pol_info) xscale(range(-1(.5)1)) xlabel(-.5(.5).5, labsize(medlarge)) ///
xline(0) byopts(compact rows(1)  legend(pos(5)))  subtitle(, size(large)) /// 
coeflabels(1.after_RBG = "After Ginsburg Passing" 1.democrat_not_republican = "Democrats" std_realism = "Legal Realism" /// 
std_politicized = "Court Politicization" pol_info = "Political Knowledge" , wrap(20) labsize(medlarge))  ///
legend(size(medlarge)) 


graph export "C:\Users\dmglick\Dropbox\Summer Survey 2020\Papers\Judicial Politics\RBGPaper\JLC Final\Figure3-relationships_combined.eps", replace



# Making the table with all regression results for the appendix


# logit regressions with reform interest as DV

quietly logit court_reform i.democrat_not_republican  std_realism std_politicized  pol_info i.college i.female age i.white i.homeowner if after_RBG==0 
quietly est store before_reform_logit

quietly logit court_reform i.democrat_not_republican  std_realism std_politicized i.democrat pol_info i.college i.female age i.white i.homeowner  if after_RBG==1 
quietly est store after_reform_logit


# table with legitimacy dv and reform dv (using OLS and logit) ##

esttab before_legit after_legit before_reform after_reform before_reform_logit after_reform_logit using relationships_model.tex /// 
, title("Relationships Between Realism and Politicization and DVs") mtitle("Pre Legit" "Post Legit" "Pre Reform" "Post Reform" "\shortstack{Pre Reform\\Logit}" ///
"\shortstack{Post Reform\\Logit}") replace label ///
drop(0.democrat_not_republican 0.female 0.college 0.white 0.homeowner) coeflabel(1.after_RBG "Post Observations" std_realism "Realism" std_politicized "Politicization" 1.democrat_not_republican "Democrat" 1.female "Female" 1.homeowner "Homeowner" 1.college "College Degree" 1.white "White") ///
 star(+ 0.1 * 0.05 ** 0.01) booktabs compress b(3) se(3) ///
addnote("Models: 1-2 are OLS on standardized DVs, 3-4 linear estimates with dichotomous DVs," "5-6 logit on the same DVs.") 





############ APPENDIX PLOTS ##########

#Modelling the relationship between legitimacy and reform interest
#First additional analysis in the paper --- tables and plot in the appendix  


#Linear approximation

# two DVs across parties

quietly regress court_campaign i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner i.democrat_not_republican
quietly est store campaign_dv_pooled

quietly regress  court_campaign i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==1
quietly est store campaign_dv_dems

quietly regress  court_campaign i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==0
quietly est store campaign_dv_reps


quietly regress  court_reform i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner i.democrat_not_republican
quietly est store reform_dv_pooled

quietly regress  court_reform i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==1
quietly est store reform_dv_dems

quietly regress  court_reform i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==0
quietly est store reform_dv_reps



quietly logit court_reform i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner i.democrat_not_republican
quietly est store reform_dv_pooled_logit

quietly logit  court_reform i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==1
quietly est store reform_dv_dems_logit

quietly logit  court_reform i.after_RBG std_legitimacy  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==0
quietly est store reform_dv_reps_logit



# with legitimacy as the DV

quietly regress  std_legitimacy i.after_RBG i.court_reform  pol_info i.college i.female age i.white i.homeowner i.democrat_not_republican
quietly est store legit_dv_pooled

quietly regress  std_legitimacy i.after_RBG i.court_reform  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==1
quietly est store legit_dv_dems

quietly regress  std_legitimacy i.after_RBG i.court_reform  pol_info i.college i.female age i.white i.homeowner if democrat_not_republican==0
quietly est store legit_dv_reps




# Table with legitimcacy DV and Reform IV For appendix 
esttab legit_dv_pooled legit_dv_dems legit_dv_reps using measure_comp_legit_dv.tex /// 
, title("Legitimacy as Function of Interest in Reform") mtitle("Pooled" "Democrats" "Republicans") replace label ///
drop(0.female 0.college 0.white 0.homeowner 0.after_RBG 0.democrat_not_republican 0.court_reform) coeflabel(1.court_reform "Reform Curiosity" 1.after_RBG "Post Observations" std_legitimacy "Legitimacy" std_politicized "Politicization" 1.democrat "Democrat" 1.female "Female" 1.homeowner "Homeowner" 1.college "College Degree" 1.white "White") ///
star(+ 0.1 * 0.05 ** 0.01) booktabs compress b(3) se(3) ///
addnote("All Models are OLS with standardized legitimacy index as DV") 


# Table with reform info DV and legitimacy IV for appendix 
esttab reform_dv_pooled reform_dv_dems reform_dv_reps reform_dv_pooled_logit reform_dv_dems_logit reform_dv_reps_logit using measure_comp_reform_dv.tex /// 
, title("Reform Interest as Function of Legitimacy") mtitle("Pooled" "Democrats" "Republicans"  "\shortstack{Pooled\\Logit}" "\shortstack{Democrats\\Logit}" "\shortstack{Republicans\\Logit}" ) replace label ///
drop(0.female 0.college 0.white 0.homeowner 0.after_RBG 0.democrat_not_republican) coeflabel(1.court_reform "Reform Curiosity" 1.after_RBG "Post Observations" std_legitimacy "Legitimacy" std_politicized "Politicization" 1.democrat "Democrat" 1.female "Female" 1.homeowner "Homeowner" 1.college "College Degree" 1.white "White") ///
star(+ 0.1 * 0.05 ** 0.01) booktabs compress b(3) se(3) ///
addnote("Interest in Reform Ideas is DV in all models. 1-3 are linear, 4-6 are logit equivalents.") 




# Plot with legitimacy and reform info as IV and DV

coefplot (reform_dv_pooled, label(Pooled) msymbol(Oh) mcolor(black) ciopts(lcolor(black) )) (reform_dv_dems, label(Democrats) msymbol(S) mcolor(blue) ciopts(lcolor(blue) ))  /// 
(reform_dv_reps, label(Republicans) msymbol(T) mcolor(red) ciopts(lcolor(red))), bylabel("Institutional Reform Interest DV")  || ///
legit_dv_pooled legit_dv_dems legit_dv_reps, bylabel("Standardized Legitimacy DV") || ///
, keep (1.after_RBG std_legitimacy 1.court_reform) xscale(range(-.75(.25).75)) xlabel(-.5(.25).5, labsize(medlarge)) xline(0) ///
byopts(compact rows(1) legend(pos(5)) note("Scale on left is probability change, on right, standardized legitimacy change")) /// 
subtitle(, size(large)) legend(size(medlarge))  ///
coeflabels(1.after_RBG = "After Ginsburg Passing" 1.court_reform="Interest in Reform" std_legitimacy = "Legitimacy" /// 
pol_info = "Political Knowledge", wrap(20) labsize(medlarge))

graph export "C:\Users\dmglick\Dropbox\Summer Survey 2020\Papers\Judicial Politics\RBGPaper\JLC Final\dv_comparison_models.eps", replace






# Appendix version of main plot --bivariate instead of OLS. 
#Also adds in additional subgroups


## ALL
quietly regress std_realism i.after_RBG
quietly est store realism_all

quietly quietly regress std_politicized i.after_RBG
quietly est store politicized_all

quietly regress std_legitimacy i.after_RBG
quietly est store legitimacy_all

quietly regress court_reform i.after_RBG
quietly est store reform_all

quietly regress court_campaign i.after_RBG
quietly est store campaign_all



## Rs

quietly regress std_realism i.after_RBG if rep==1
quietly est store realism_r

quietly regress std_politicized i.after_RBG if rep==1
quietly est store politicized_r

quietly regress std_legitimacy i.after_RBG if rep==1
quietly est store legitimacy_r

quietly regress court_reform i.after_RBG if rep==1
quietly est store reform_r

quietly logit court_campaign i.after_RBG if rep==1
quietly est store campaign_r


## Ds

quietly regress std_realism i.after_RBG if dem==1
quietly est store realism_d

quietly regress std_politicized i.after_RBG if dem==1
quietly est store politicized_d

quietly regress std_legitimacy i.after_RBG if dem==1
quietly est store legitimacy_d

quietly regress court_reform i.after_RBG if dem==1
quietly est store reform_d

quietly regress court_campaign i.after_RBG if dem==1
quietly est store campaign_d


# Strong Rs


quietly regress std_realism i.after_RBG if vstrong_rep==1
quietly est store realism_sr

quietly regress std_politicized i.after_RBG if vstrong_rep==1
quietly est store politicized_sr

quietly regress std_legitimacy i.after_RBG if vstrong_rep==1
quietly est store legitimacy_sr

quietly regress court_reform i.after_RBG if vstrong_rep==1
quietly est store reform_sr

quietly regress court_campaign i.after_RBG if vstrong_rep==1
quietly est store campaign_sr



## Strong Ds

quietly regress std_realism i.after_RBG if vstrong_dem==1
quietly est store realism_sd

quietly regress std_politicized i.after_RBG if vstrong_dem==1
quietly est store politicized_sd

quietly regress std_legitimacy i.after_RBG if vstrong_dem==1
quietly est store legitimacy_sd

quietly regress court_reform i.after_RBG if vstrong_dem==1
quietly est store reform_sd

quietly regress court_campaign i.after_RBG if vstrong_dem==1
quietly est store campaign_sd



## High Info Rs

quietly regress std_realism i.after_RBG if high_info_rep==1
quietly est store realism_info_r

quietly regress std_politicized i.after_RBG if high_info_rep==1
quietly est store politicized_info_r

quietly regress std_legitimacy i.after_RBG if high_info_rep==1
quietly est store legitimacy_info_r

quietly regress court_reform i.after_RBG if high_info_rep==1
quietly est store reform_info_r

quietly regress court_campaign i.after_RBG if high_info_rep==1
quietly est store campaign_info_r



## High Info Ds

quietly regress std_realism i.after_RBG if high_info_dem==1
quietly est store realism_info_d

quietly regress std_politicized i.after_RBG if high_info_dem==1
quietly est store politicized_info_d

quietly regress std_legitimacy i.after_RBG if high_info_dem==1
quietly est store legitimacy_info_d

quietly regress court_reform i.after_RBG if high_info_dem==1
quietly est store reform_info_d

quietly regress court_campaign i.after_RBG if high_info_dem==1
quietly est store campaign_info_d




coefplot  (legitimacy_d, aseq("Democrats") mcolor(blue) msymbol(T) msize(medlarge) ciopts(lcolor(blue))) /// 
(legitimacy_r, aseq("Republicans") mcolor(red) msymbol(Sh) msize(medlarge) ciopts(lcolor(red) )) ///
(legitimacy_all, aseq("All") mcolor(black) msymbol(Oh) msize(medlarge) ciopts(lcolor(black) )) ///
(legitimacy_sd, aseq("Strong Democrats") mcolor(blue) msymbol(S) msize(medlarge) ciopts(lcolor(blue) )) ///
(legitimacy_info_d, aseq("High Info Democrats") mcolor(blue) msymbol(X) msize(medlarge) ciopts(lcolor(blue) )) ///
, nokey bylabel("{bf:Court Legitimacy}")|| ///
(politicized_d, aseq("Democrats") ) ///
(politicized_r, aseq("Republicans") ) ///
(politicized_all, aseq("All") ) ///
(politicized_sd, aseq("Strong Democrats") ) ///
(politicized_info_d, aseq("High Info Democrats") ) ///
, nokey bylabel(Politicized Court)|| ///  
(realism_d, aseq("Democrats") ) ///
(realism_r, aseq("Republicans") ) ///
(realism_all, aseq("All") ) ///
(realism_sd, aseq("Strong Democrats") ) ///
(realism_info_d, aseq("High Info Democrats") ) ///
, bylabel(Legal Realism) nokey || ///
, drop(_cons) xscale(range(-1(.25)1)) xlabel(-1(.5)1, labsize(medlarge))  legend(off) nooffset asequation swapnames  xline(0) ///
byopts(compact rows(1)) ///
graphregion(margin(0 0 0 0)) ylab(,labsize(medlarge))  subtitle(, size(large)) legend(size(medlarge)) ///
subtitle(, size(medium)) xtitle(Bivariate: Standardized Effect of Ginburg's Passing (Post Group vs. Pre), size(medlarge)) ///
saving(main_continuous_bivariate, replace)



coefplot  (reform_d, aseq("Democrats") mcolor(blue) msymbol(T) msize(medlarge) ciopts(lcolor(blue))) /// 
(reform_r, aseq("Republicans") mcolor(red) msymbol(Sh) msize(medlarge) ciopts(lcolor(red) )) ///
(reform_all, aseq("All") mcolor(black) msymbol(Oh) msize(medlarge) ciopts(lcolor(black) )) ///
(reform_sd, aseq("Strong Democrats") mcolor(blue) msymbol(S) msize(medlarge) ciopts(lcolor(blue) )) ///
(reform_info_d, aseq("High Info Democrats") mcolor(blue) msymbol(X) msize(medlarge) ciopts(lcolor(blue) )) ///
, nokey bylabel("{bf:Interest in Learning More: Court Reform}") || ///
(campaign_d, aseq("Democrats") ) ///
(campaign_r, aseq("Republicans") ) ///
(campaign_all, aseq("All") ) ///
(campaign_sd, aseq("Strong Democrats") ) ///
(campaign_info_d, aseq("High Info Democrats") )  ///
, nokey bylabel(Interest in Learning More: Appointments in Campaigns) || ///
, drop(_cons) xscale(range(-1(.25)1)) xlabel(-1(.5)1, labsize(medlarge))  legend(off) nooffset asequation swapnames  xline(0) ///
byopts(compact rows(1)) ///
graphregion(margin(0 0 0 0)) ylab(,labsize(medlarge))  subtitle(, size(large)) legend(size(medlarge)) ///
subtitle(, size(medium)) xtitle(Bivariate: Standardized Effect of Ginburg's Passing (Post Group vs. Pre), size(medlarge)) ///
saving(main_dichotomous_bivariate, replace)



gr combine main_continuous_bivariate.gph main_dichotomous_bivariate.gph, col(1)


graph export "C:\Users\dmglick\Dropbox\Summer Survey 2020\Papers\Judicial Politics\RBGPaper\JLC Final\mainresults_bivariate_V2.eps", replace





#to export codebook
#preserve
#describe, replace clear
#export excel "C:\Users\dmglick\Dropbox\Summer Survey 2020\Papers\Judicial Politics\RBGPaper\JLC Final\codebook.xls", replace
#restore

#to export notes
#notes*

 
 














